//对抗赛 实质就是背包问题
#include <iostream>
using namespace std;
const int MAXN=50;
const int MAXS=100;
int s[MAXN+1];
int n;
int solunum[MAXN*MAXS/2+10];
int sum=0;
int main(){
    cin>>n;
    for(int i=1;i<=n;i++) {
        cin>>s[i];
        sum+=s[i];
    }

    if (sum%2!=0) {
        cout<<0;
        return 0;
    }else {
        sum=sum/2;
        solunum[0]=1;
        for(int i=1;i<=n;i++)
            for(int v=sum;v>=s[i];v--)
                solunum[v]+=solunum[v-s[i]];
        cout<<solunum[sum]/2;
    }
}
